package demo.com.xml;

/**
 * Created by se1 on 16-11-17.
 */
public class StringUtil {

    public static String padLeft(String oriStr, int len, char alexin) {
        StringBuilder builder = new StringBuilder();
        builder.append(oriStr);
        int strlen = oriStr.length();
        if (strlen < len) {
            for (int i = 0; i < len - strlen; i++) {
                builder.append(alexin);
            }
        }
        return builder.toString();
    }
}
